package com.neusoft.neu24.nep.controller;

import com.neusoft.neu24.nep.entity.Account;
import com.neusoft.neu24.nep.entity.CommonResult;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/p")
@CrossOrigin("*")
public class NacosProviderController {

    @Resource
    private Environment environment;

    @GetMapping("/q/a/{wxid}")
    public CommonResult selectAcountByWxid(@PathVariable("wxid") String wxid) {

        log.info("   NacosProviderController ---- >    " + environment.getProperty("server.port"));

        Account account = new Account();
        account.setWxid(wxid);
        return CommonResult.sucess(account);
    }
}
